﻿#include "FITKAbaConnectorBehaviorPlasticity.h"



Interface::FITKAbaConnectorBehaviorEnum::ConnectorBehaviorType Interface::FITKAbaConnectorBehaviorPlasticity::getBehaviorType() const
{
    return Interface::FITKAbaConnectorBehaviorEnum::ConnectorBehaviorType::Plasticity;
}


namespace Interface {

FITKAbaConnectorBehaviorEnum::Coupling FITKAbaConnectorBehaviorPlasticity::getCoupling() const
{
    return m_coupling;
}

std::array<bool, 6> FITKAbaConnectorBehaviorPlasticity::getForceMoment() const
{
    return m_forceMoment;
}

bool FITKAbaConnectorBehaviorPlasticity::getSpecifyHardening() const
{
    return m_specifyHardening;
}

bool FITKAbaConnectorBehaviorPlasticity::getSpecifyKinematicHardening() const
{
    return m_specifyKinematicHardening;
}

FITKAbaConnectorBehaviorEnum::PlacticityIsoTropicHardeningDefinition FITKAbaConnectorBehaviorPlasticity::getIsoHardenDefinition() const
{
    return m_isoHardenDefinition;
}

void FITKAbaConnectorBehaviorPlasticity::setCoupling(const FITKAbaConnectorBehaviorEnum::Coupling &newCoupling)
{
    m_coupling = newCoupling;
}

void FITKAbaConnectorBehaviorPlasticity::setForceMoment(const std::array<bool, 6> &newForceMoment)
{
    m_forceMoment = newForceMoment;
}

void FITKAbaConnectorBehaviorPlasticity::setSpecifyHardening(bool newSpecifyHardening)
{
    m_specifyHardening = newSpecifyHardening;
}

void FITKAbaConnectorBehaviorPlasticity::setSpecifyKinematicHardening(bool newSpecifyKinematicHardening)
{
    m_specifyKinematicHardening = newSpecifyKinematicHardening;
}

void FITKAbaConnectorBehaviorPlasticity::setIsoHardenDefinition(const FITKAbaConnectorBehaviorEnum::PlacticityIsoTropicHardeningDefinition &newIsoHardenDefinition)
{
    m_isoHardenDefinition = newIsoHardenDefinition;
}

int FITKAbaConnectorBehaviorPlasticity::getIsoHardenTabDataRowCount() const
{
    return m_isoHardenTabDatas.size();
}

void FITKAbaConnectorBehaviorPlasticity::setIsoHardenTabDataRowCount(int num)
{
    if (num >= 1)
        m_isoHardenTabDatas.resize(num);
}

void FITKAbaConnectorBehaviorPlasticity::insertHardenTabDataRowCount(int index)
{
    if (index >= 0 && index < m_isoHardenTabDatas.size())
        m_isoHardenTabDatas.insert(index, PlasticityIsoHardenTabData());
}

void FITKAbaConnectorBehaviorPlasticity::removeHardenTabDataRowCount(int index)
{
    if (m_isoHardenTabDatas.size()==1)
        return;
    if (index >= 0 && index < m_isoHardenTabDatas.size())
        m_isoHardenTabDatas.removeAt(index);
}

PlasticityIsoHardenTabData &FITKAbaConnectorBehaviorPlasticity::getIsoHardenTabDataRow(int index)
{
    return m_isoHardenTabDatas[index];
}

const PlasticityIsoHardenTabData &FITKAbaConnectorBehaviorPlasticity::getIsoHardenTabDataRow(int index) const
{
    return m_isoHardenTabDatas[index];
}


double PlasticityIsoHardenTabData::getYieldForceMoment() const
{
    return YieldForceMoment;
}

void PlasticityIsoHardenTabData::setYieldForceMoment(double newYieldForceMoment)
{
    YieldForceMoment = newYieldForceMoment;
}

double PlasticityIsoHardenTabData::getPlasticMotion() const
{
    return PlasticMotion;
}

void PlasticityIsoHardenTabData::setPlasticMotion(double newPlasticMotion)
{
    PlasticMotion = newPlasticMotion;
}

double PlasticityIsoHardenTabData::getRate() const
{
    return Rate;
}

void PlasticityIsoHardenTabData::setRate(double newRate)
{
    Rate = newRate;
}

}
